﻿@model YodaMaster.Models.Student

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Student</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.LastName)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.LastName)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.FirstMidName)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.FirstMidName)
    </div>
      <div class="display-label">
         @Html.DisplayNameFor(model => model.StudentID)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.StudentID)
    </div>
      <div class="display-label">
         @Html.DisplayNameFor(model => model.studentGender)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.studentGender)
    </div>
      <div class="display-label">
         @Html.DisplayNameFor(model => model.studentType)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.studentType)
    </div>
    <div class="display-label">
    @Html.LabelFor(model => model.Enrollments)
</div>
<div class="display-field">
    <table>
        <tr>
            <th>Course ID</th>
            <th> Course Name </th>
            <th>Grade</th>
            
        </tr>
        @foreach (var item in Model.Enrollments)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.CourseID)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Course_Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Grade)
                </td>
            </tr>
        }
    </table>
</div>
   
</fieldset>

<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.RecordID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
